package com.Math;

import java.util.Scanner;

public class RegexDemo3 {
    public static void main(String[] args) {
        //1编写正则表达式完成验证用户输入输入的手机号是否满足要求
        //1:输入手机号
        Scanner sc = new Scanner(System.in);
//        System.out.println("请输入手机号：");
//        String phoneNumber = sc.next();
//        //2:验证手机号码
//        //13112345768
//
//        boolean flag1 = phoneNumber.matches("[^o]\\d{10}");
//        System.out.println(flag1);

        //验证用户输入的邮箱是否正确
//        while(true){
//            System.out.println("请输入邮箱");
//            String Email = sc.next();
//            boolean flag2 = Email.matches("[\\w&&[^—_]]{4,10}[@][\\w&&[^—_]]{2,8}[.](cnn|com|cn|com[.]cn)");
//            System.out.println(flag2);
//
//        }

        //验证座机号码是否正确



            String str = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
            System.out.println("00:00:00".matches(str));


        }



}
